<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>谷粒商城笔记 - 一、环境准备 | 个人博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
    <meta name="keywords" content="java" />
  
  <meta name="description" content="环境准备安装虚拟机 下载 virtualBox 下载vagrant 打开cmd，使用centOS国内镜像安装，并使用vagrant up启动虚拟机  12vagrant init centos7 https:&#x2F;&#x2F;mirrors.ustc.edu.cn&#x2F;centos-cloud&#x2F;centos&#x2F;7&#x2F;vagrant&#x2F;x86_64&#x2F;images&#x2F;CentOS-7.boxvagrant up   使用vag">
<meta property="og:type" content="article">
<meta property="og:title" content="谷粒商城笔记 - 一、环境准备">
<meta property="og:url" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/index.html">
<meta property="og:site_name" content="个人博客">
<meta property="og:description" content="环境准备安装虚拟机 下载 virtualBox 下载vagrant 打开cmd，使用centOS国内镜像安装，并使用vagrant up启动虚拟机  12vagrant init centos7 https:&#x2F;&#x2F;mirrors.ustc.edu.cn&#x2F;centos-cloud&#x2F;centos&#x2F;7&#x2F;vagrant&#x2F;x86_64&#x2F;images&#x2F;CentOS-7.boxvagrant up   使用vag">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87%5Cimage-20210822101737744.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822105742585.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822111320183.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822113334057.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822140842764.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822141533541.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822175611925.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822192744040.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822234550249.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822212507404.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822212859933.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210822235923485.png">
<meta property="og:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users/yaofa/AppData/Roaming/Typora/typora-user-images/image-20210823232100599.png">
<meta property="article:published_time" content="2021-08-23T18:16:34.000Z">
<meta property="article:modified_time" content="2021-08-23T18:33:40.466Z">
<meta property="article:author" content="Yao">
<meta property="article:tag" content="谷粒商城">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87%5Cimage-20210822101737744.png">
  
  
    <link rel="icon" href="/favicon.ico">
  
  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  
<link rel="stylesheet" href="/css/style.css">

  
<script src="/js/pace.min.js"></script>

  

  
  

<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
      <header id="header">
    <div id="banner"></div>
    <div id="header-outer">
        <div id="header-menu" class="header-menu-pos animated">
            <div class="header-menu-container">
                <a href="/" class="left">
                    <span class="site-title">YaoFa&#39;s Blog</span>
                </a>
                <nav id="header-menu-nav" class="right">
                    
                    <a  href="/">
                        <i class="fa fa-home"></i>
                        <span>Home</span>
                    </a>
                    
                    <a  href="/archives">
                        <i class="fa fa-archive"></i>
                        <span>Archives</span>
                    </a>
                    
                    <a  href="/about">
                        <i class="fa fa-user"></i>
                        <span>About</span>
                    </a>
                    
                </nav>
                <a class="mobile-header-menu-button">
                    <i class="fa fa-bars"></i>
                </a>
            </div>
        </div>
        <div id="header-row">
            <div id="logo">
                <a href="/">
                    <img src="/images/logo1.jpg" alt="logo">
                </a>
            </div>
            <div class="header-info">
                <div id="header-title">
                    
                    <h2>
                        YaoFa&#39;s Blog
                    </h2>
                    
                </div>
                <div id="header-description">
                    
                    <h3>
                        一个Java 开发者的个人博客
                    </h3>
                    
                </div>
            </div>
            <nav class="header-nav">
                <div class="social">
                    
                        <a title="MinHow" target="_blank" href="//minhow.com">
                            <i class="fa fa-home fa-2x"></i></a>
                    
                        <a title="Github" target="_blank" href="//github.com/wongminho">
                            <i class="fa fa-github fa-2x"></i></a>
                    
                        <a title="Weibo" target="_blank" href="//weibo.com/WongMinHo">
                            <i class="fa fa-weibo fa-2x"></i></a>
                    
                        <a title="Twitter" target="_blank" href="//twitter.com/huangminhow">
                            <i class="fa fa-twitter fa-2x"></i></a>
                    
                </div>
            </nav>
        </div>
    </div>
</header>
      <div class="outer">
        <section id="main" class="body-wrap"><article id="post-谷粒商城笔记-一、环境准备" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="post-title" itemprop="name">
      谷粒商城笔记 - 一、环境准备
    </h1>
    <div class="post-title-bar">
      <ul>
          
        <li>
          <i class="fa fa-calendar"></i>  2021-08-24
        </li>
        <li>
          <i class="fa fa-eye"></i>
          <span id="busuanzi_value_page_pv"></span>
        </li>
      </ul>
    </div>
  

          
      </header>
    
    <div class="article-entry post-content" itemprop="articleBody">
      
            
            <h1 id="环境准备"><a href="#环境准备" class="headerlink" title="环境准备"></a>环境准备</h1><h2 id="安装虚拟机"><a href="#安装虚拟机" class="headerlink" title="安装虚拟机"></a>安装虚拟机</h2><ol>
<li>下载 virtualBox</li>
<li>下载vagrant</li>
<li>打开cmd，使用centOS国内镜像安装，并使用vagrant up启动虚拟机</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">vagrant init centos7 https://mirrors.ustc.edu.cn/centos-cloud/centos/7/vagrant/x86_64/images/CentOS-7.box</span><br><span class="line">vagrant up</span><br></pre></td></tr></table></figure>

<ol start="4">
<li>使用vagrant ssh连接虚拟机</li>
<li>打开一个新的cmd，使用ipconfig查看ip</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87%5Cimage-20210822101737744.png" alt="image-20210822101737744"></p>
<ol start="6">
<li>修改虚拟机的ip地址 Vagrantfile文件中，打开以下注释</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">config.vm.network <span class="string">&quot;private_network&quot;</span>, ip: <span class="string">&quot;192.168.56.10&quot;</span></span><br></pre></td></tr></table></figure>

<ol start="7">
<li>执行 vagrant reload重启虚拟机，执行ip addr查看虚拟机ip</li>
<li>将虚拟机与主机ip相互ping， 设置完成</li>
</ol>
<h2 id="安装docker"><a href="#安装docker" class="headerlink" title="安装docker"></a>安装docker</h2><ol>
<li>执行以下命令，清空以前安装的docker</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">$ sudo yum remove docker \</span><br><span class="line">                  docker-client \</span><br><span class="line">                  docker-client-latest \</span><br><span class="line">                  docker-common \</span><br><span class="line">                  docker-latest \</span><br><span class="line">                  docker-latest-logrotate \</span><br><span class="line">                  docker-logrotate \</span><br><span class="line">                  docker-engine</span><br></pre></td></tr></table></figure>

<ol start="2">
<li>分别执行命令安装所需要的工具</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">$ sudo yum install -y yum-utils</span><br><span class="line"></span><br><span class="line">$ sudo yum-config-manager \</span><br><span class="line">    --add-repo \</span><br><span class="line">    http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo</span><br></pre></td></tr></table></figure>

<ol start="3">
<li>安装docker</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ sudo yum install docker-ce docker-ce-cli containerd.io</span><br></pre></td></tr></table></figure>

<ol start="4">
<li>启动docker</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ sudo systemctl start docker</span><br></pre></td></tr></table></figure>

<ol start="5">
<li>查看是否安装成功</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ sudo docker run hello-world</span><br></pre></td></tr></table></figure>

<ol start="6">
<li>查看docker镜像</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ sudo docker images</span><br></pre></td></tr></table></figure>

<ol start="7">
<li>配置docker阿里云镜像 登录阿里云官网 进入控制台 选择容器镜像 镜像加速器 然后一次执行以下命令</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo mkdir -p /etc/dockersudo tee /etc/docker/daemon.json &lt;&lt;-<span class="string">&#x27;EOF&#x27;</span>&#123;  <span class="string">&quot;registry-mirrors&quot;</span>: [<span class="string">&quot;https://43f49ufz.mirror.aliyuncs.com&quot;</span>]  &#125;EOFsudo systemctl daemon-reloadsudo systemctl restart docker</span><br></pre></td></tr></table></figure>

<ol start="8">
<li>设置开机自启动</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl <span class="built_in">enable</span> docker</span><br></pre></td></tr></table></figure>

<h2 id="docker安装mysql"><a href="#docker安装mysql" class="headerlink" title="docker安装mysql"></a>docker安装mysql</h2><ol>
<li>执行安装命令,根据自己需要的版本进行安装</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ sudo docker pull mysql:5.7              </span><br></pre></td></tr></table></figure>

<ol start="2">
<li>使用命令切换到root用户,密码为vagrant                </li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ su root          </span><br></pre></td></tr></table></figure>

<ol start="3">
<li>配置mysql  //将linux3306端口:容器内部3306端口映射 取名   //-v:目录挂载  linux中的文件夹与容器内部文件夹映射</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># docker run -p 3306:3306 --name mysql \ -v /mydata/mysql/log:/var/log/mysql \ -v /mydata/mysql/data:/var/lib/mysql \ -v /mydata/mysql/conf:/etc/mysql \ -e MYSQL_ROOT_PASSWORD=root \ -d mysql:5.7      </span></span><br></pre></td></tr></table></figure>

<ol start="4">
<li>查看mysql是否已经运行          </li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># docker ps      </span></span><br></pre></td></tr></table></figure>

<ol start="5">
<li>进入mysql容器内部     </li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker <span class="built_in">exec</span> -it mysql /bin/bash </span><br></pre></td></tr></table></figure>

<ol start="6">
<li>添加mysql配置文件 </li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vi /mydata/mysql/conf/my.cnf  </span><br></pre></td></tr></table></figure>

<p>输入以下配置</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] init_connect=&#x27;SET collation_connection = utf8_unicode_ci&#x27; init_connect=&#x27;SET NAMES utf8&#x27; character-set-server=utf8 collation-server=utf8_unicode_ci skip-character-set-client-handshake skip-name-resolve     </span><br></pre></td></tr></table></figure>

<ol start="7">
<li>自动启动镜像</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo docker update mysql --restart=always </span><br></pre></td></tr></table></figure>



<h2 id="docker安装redis"><a href="#docker安装redis" class="headerlink" title="docker安装redis"></a>docker安装redis</h2><p>1.拉取镜像,使用最新版本</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># docker pull redis  </span></span><br></pre></td></tr></table></figure>

<p>2.创建redis.conf文件 /mydata/redis/conf/redis.conf ,写入以下内容,开始redis持久化</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">appendonly yes</span><br></pre></td></tr></table></figure>

<p>3.运行redis</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"># docker run -p 6379:6379 --name redis \ -v /mydata/redis/data:/data \ -v/mydata/redis/conf/redis.conf:/etc/redis/redis.conf \-d redis redis-server /etc/redis/redis.conf </span><br></pre></td></tr></table></figure>

<p>4.进入redis    </p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># docker exec -it redis redis-cli</span></span><br></pre></td></tr></table></figure>

<p>5.开机自启动</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># docker update redis --restart=always      </span></span><br></pre></td></tr></table></figure>

<h2 id="开发工具配置"><a href="#开发工具配置" class="headerlink" title="开发工具配置"></a>开发工具配置</h2><ol>
<li>idea配置maven阿里云镜像</li>
<li>idea安装lombok、mybatisX插件</li>
<li>vscode安装以下插件</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822105742585.png" alt="image-20210822105742585"></p>
<h2 id="配置git"><a href="#配置git" class="headerlink" title="配置git"></a>配置git</h2><ol>
<li>打开git控制台，依次执行以下命令</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --global user.name <span class="string">&quot;minihad&quot;</span>git config --global user.email <span class="string">&quot;hhfhhf66@163.com&quot;</span>ssh-keygen -t rsa -C <span class="string">&quot;hhfhhf66@163.com&quot;</span> //三次回车后 生成密令cat ~/.ssh/id_rsa.pub //查看完整密令</span><br></pre></td></tr></table></figure>

<ol start="2">
<li>在gitee个人设置中找个ssh公钥，填入上边查看的完整密令</li>
<li>在git控制台中执行，以下命令查看是否成功</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh -T git@gitee.com</span><br></pre></td></tr></table></figure>

<h2 id="gitee-新建仓库并初始化项目"><a href="#gitee-新建仓库并初始化项目" class="headerlink" title="gitee 新建仓库并初始化项目"></a>gitee 新建仓库并初始化项目</h2><ol>
<li>新建仓库</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822111320183.png" alt="image-20210822111320183"></p>
<ol start="2">
<li>创建仓库成功，复制项目地址</li>
<li>打开idea，新建项目，通过版本控制器新建，填入刚刚复制的项目地址</li>
<li>项目创建成功，创建微服务模块，通过springinitialer项目创建，选择以下两个依赖</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822113334057.png" alt="image-20210822113334057"></p>
<ol start="5">
<li>分别创建商品、仓储、订单、优惠券、用户（product/ware/order/coupon/member）服务</li>
<li>复制一个pom.xml文件到根目录，更改pom文件内容</li>
</ol>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span><span class="tag">&lt;<span class="name">project</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://maven.apache.org/POM/4.0.0&quot;</span> <span class="attr">xmlns:xsi</span>=<span class="string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>         <span class="attr">xsi:schemaLocation</span>=<span class="string">&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;</span>&gt;</span>    <span class="tag">&lt;<span class="name">modelVersion</span>&gt;</span>4.0.0<span class="tag">&lt;/<span class="name">modelVersion</span>&gt;</span>    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.yaofa<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span>    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>gulimall<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span>    <span class="tag">&lt;<span class="name">version</span>&gt;</span>0.0.1-SNAPSHOT<span class="tag">&lt;/<span class="name">version</span>&gt;</span>    <span class="tag">&lt;<span class="name">name</span>&gt;</span>gulimall<span class="tag">&lt;/<span class="name">name</span>&gt;</span>    <span class="tag">&lt;<span class="name">description</span>&gt;</span>聚合服务<span class="tag">&lt;/<span class="name">description</span>&gt;</span>    <span class="tag">&lt;<span class="name">packaging</span>&gt;</span>pom<span class="tag">&lt;/<span class="name">packaging</span>&gt;</span>    <span class="tag">&lt;<span class="name">modules</span>&gt;</span>        <span class="tag">&lt;<span class="name">module</span>&gt;</span>gulimall-coupon<span class="tag">&lt;/<span class="name">module</span>&gt;</span>        <span class="tag">&lt;<span class="name">module</span>&gt;</span>gulimall-member<span class="tag">&lt;/<span class="name">module</span>&gt;</span>        <span class="tag">&lt;<span class="name">module</span>&gt;</span>gulimall-order<span class="tag">&lt;/<span class="name">module</span>&gt;</span>        <span class="tag">&lt;<span class="name">module</span>&gt;</span>gulimall-product<span class="tag">&lt;/<span class="name">module</span>&gt;</span>        <span class="tag">&lt;<span class="name">module</span>&gt;</span>gulimall-ware<span class="tag">&lt;/<span class="name">module</span>&gt;</span>    <span class="tag">&lt;/<span class="name">modules</span>&gt;</span><span class="tag">&lt;/<span class="name">project</span>&gt;</span></span><br></pre></td></tr></table></figure>

<ol start="7">
<li>选择下图中的添加pom文件，然后点击clean测试聚合工程</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822140842764.png" alt="image-20210822140842764"></p>
<ol start="8">
<li>打开根目录下的<code>.gitignore</code> 文件，设置git提交忽略的文件</li>
</ol>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">**/mvnw**/mvnw.cmd**/.mvn**/target/.idea**/.gitignore</span><br></pre></td></tr></table></figure>

<ol start="9">
<li><p>idea设置中打开插件，安装gitee</p>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822141533541.png" alt="image-20210822141533541"></p>
</li>
<li><p>commit&amp;push，到浏览器gitee中发现已经提交成功</p>
</li>
</ol>
<h2 id="数据库初始化"><a href="#数据库初始化" class="headerlink" title="数据库初始化"></a>数据库初始化</h2><ol>
<li>打开navicat连接虚拟机docker的数据库</li>
<li>新建数据库，选择utf8mb4字符集</li>
<li>运行sql脚本初始化数据表</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822175611925.png" alt="image-20210822175611925"></p>
<h2 id="拉取renren-fast项目"><a href="#拉取renren-fast项目" class="headerlink" title="拉取renren-fast项目"></a>拉取renren-fast项目</h2><ul>
<li><p>renren-fast后端项目：</p>
<pre><code>1. 在gitee上搜索renren-fast2. 找到renren-fast和renren-fast-vue项目3. 在本地使用git 克隆两个项目，删除项目中的.git文件4. 将renren-fast后台项目复制到谷粒商城目录中5. 更改根目录的pom文件，添加子模块6. 将项目中的sql文件复制到mall_admin数据库中执行7. 更改application.yml文件中的数据库连接信息8. 启动项目
</code></pre>
</li>
<li><p>renren-fast-vue 前端项目</p>
<ol>
<li>下载node.js，并且设置淘宝镜像</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install -g cnpm --registry=https://registry.npm.taobao.org</span><br></pre></td></tr></table></figure>

<ol start="2">
<li>vscode中打开控制台，输入命令，会根据项目中的package.json安装依赖</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install</span><br></pre></td></tr></table></figure>

<ul>
<li><p>如果npm install出错，则执行<code>npm install  node-sass@4.14</code></p>
</li>
<li><p>报错问题解决： </p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/hancoder/article/details/113821646">https://blog.csdn.net/hancoder/article/details/113821646</a></p>
</li>
</ul>
<ol start="3">
<li>执行 <code>npm run dev</code> 运行项目</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822192744040.png" alt="image-20210822192744040"></p>
</li>
</ul>
<h2 id="使用renren-generator生成代码"><a href="#使用renren-generator生成代码" class="headerlink" title="使用renren-generator生成代码"></a>使用renren-generator生成代码</h2><ol>
<li>使用git 克隆项目 <a target="_blank" rel="noopener" href="https://gitee.com/renrenio/renren-generator.git%EF%BC%8C%E5%B9%B6%E5%88%A0%E6%8E%89%60.git%60%E6%96%87%E4%BB%B6%E5%A4%B9">https://gitee.com/renrenio/renren-generator.git，并删掉`.git`文件夹</a></li>
<li>将项目复制到自己项目的根目录，更改controller生成模板，去掉shiro权限注解，并且去掉import的包</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822234550249.png" alt="image-20210822234550249"></p>
<ol start="3">
<li><p>pom文件中加入renren-generator子模块</p>
</li>
<li><p>更改renren-generator项目中的yml配置文件中的数据库配置信息，数据库名填写需要生成实体的数据库</p>
</li>
<li><p>更改generator.properties文件</p>
</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822212507404.png" alt="image-20210822212507404"></p>
<ol start="6">
<li>启动项目，访问<code>localhost</code>，默认80端口，全选表，点击生成</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822212859933.png" alt="image-20210822212859933"></p>
<ol start="7">
<li>解压生成的压缩包，拷贝<code>main</code>文件夹到相应的项目包下</li>
<li>新建common模块，使用maven工程创建，并且在其他模块pom中依赖common模块</li>
<li>在common模块pom中开始引入依赖</li>
</ol>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span>    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.baomidou<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span>    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>mybatis-plus-boot-starter<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span>    <span class="tag">&lt;<span class="name">version</span>&gt;</span>3.2.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span><span class="tag">&lt;<span class="name">dependency</span>&gt;</span>    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.projectlombok<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span>    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>lombok<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span>    <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.18.8<span class="tag">&lt;/<span class="name">version</span>&gt;</span><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span><span class="tag">&lt;<span class="name">dependency</span>&gt;</span>   <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.apache.httpcomponents<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span>    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>httpcore<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span>    <span class="tag">&lt;<span class="name">version</span>&gt;</span>4.4.12<span class="tag">&lt;/<span class="name">version</span>&gt;</span><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span><span class="tag">&lt;<span class="name">dependency</span>&gt;</span>    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>commons-lang<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span>    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>commons-lang<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span>    <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.6<span class="tag">&lt;/<span class="name">version</span>&gt;</span><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span><span class="tag">&lt;<span class="name">dependency</span>&gt;</span>    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>mysql<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span>    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>mysql-connector-java<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span>    <span class="tag">&lt;<span class="name">version</span>&gt;</span>8.0.17<span class="tag">&lt;/<span class="name">version</span>&gt;</span><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span><span class="tag">&lt;<span class="name">dependency</span>&gt;</span>    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>javax.servlet<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span>    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>javax.servlet-api<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span>    <span class="tag">&lt;<span class="name">version</span>&gt;</span>3.1.0<span class="tag">&lt;/<span class="name">version</span>&gt;</span>    <span class="tag">&lt;<span class="name">scope</span>&gt;</span>provided<span class="tag">&lt;/<span class="name">scope</span>&gt;</span><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>

<ol start="10">
<li>复制 <code>renren-fast</code> 模块中部分工具类到common模块中</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210822235923485.png" alt="image-20210822235923485"></p>
<h2 id="整合-Mybatis-Plus-配置"><a href="#整合-Mybatis-Plus-配置" class="headerlink" title="整合 Mybatis-Plus 配置"></a>整合 Mybatis-Plus 配置</h2><ol>
<li><p>导入依赖，已经完成</p>
</li>
<li><p>配置数据源</p>
<ol>
<li>在common的pom文件中导入数据库驱动，已经完成</li>
<li>在application.yml文件中配置数据源</li>
</ol>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">spring:  datasource:    username: root    password: root    url:</span> <span class="string">jdbc:mysql://192.168.56.10:3306/mall_pms?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=Asia/Shanghai</span>    <span class="attr">driver-class-name: com.mysql.jdbc.Drivermybatis-plus:  mapper-locations:</span> <span class="string">classpath*:/mapper/**/*.xml</span> <span class="comment">#告诉mybatis-plus，sql映射文件  global-config:    db-config:      id-type: auto #配置主键自增</span></span><br></pre></td></tr></table></figure></li>
<li><p>配置Mybatis-Plus属性</p>
<ol>
<li>在启动类上使用@MapperScan设置扫描类</li>
<li>在yml文件中配置mybatis-plus，sql映射文件路径，2.2中已完成</li>
</ol>
</li>
</ol>
<h2 id="生成其他几个模块的代码"><a href="#生成其他几个模块的代码" class="headerlink" title="生成其他几个模块的代码"></a>生成其他几个模块的代码</h2><ol>
<li>更改<code>renren-generator</code> 项目中的 <code>generator.properties</code> 文件，修改所需要生成代码的数据库的模块名和表前缀</li>
</ol>
<p><img src="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/Users\yaofa\AppData\Roaming\Typora\typora-user-images\image-20210823232100599.png" alt="image-20210823232100599"></p>
<ol start="2">
<li>更改<code>renren-generator</code> 项目中 <code>application.yml</code> 文件中数据库信息，修改为对应的数据库表</li>
<li>重启项目，到浏览器中访问生成代码，复制到相应的模块中</li>
</ol>

            <div class="post-copyright">
    <div class="content">
        <p>最后更新： 2021年08月24日 02:33</p>
        <p>原始链接： <a class="post-url" href="/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/" title="谷粒商城笔记 - 一、环境准备">http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/</a></p>
        <footer>
            <a href="http://example.com">
                <img src="/images/logo1.jpg" alt="Yao">
                Yao
            </a>
        </footer>
    </div>
</div>

      
        
            

        
    </div>
    <footer class="article-footer">
        
        
<div class="post-share">
    <a href="javascript:;" id="share-sub" class="post-share-fab">
        <i class="fa fa-share-alt"></i>
    </a>
    <div class="post-share-list" id="share-list">
        <ul class="share-icons">
          <li>
            <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/&title=《谷粒商城笔记 - 一、环境准备》 — 个人博客&pic=http://example.comimages/logo1.jpg" data-title="微博">
              <i class="fa fa-weibo"></i>
            </a>
          </li>
          <li>
            <a class="weixin share-sns" id="wxFab" href="javascript:;" data-title="微信">
              <i class="fa fa-weixin"></i>
            </a>
          </li>
          <li>
            <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/&title=《谷粒商城笔记 - 一、环境准备》 — 个人博客&source=" data-title="QQ">
              <i class="fa fa-qq"></i>
            </a>
          </li>
          <li>
            <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/" data-title="Facebook">
              <i class="fa fa-facebook"></i>
            </a>
          </li>
          <li>
            <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《谷粒商城笔记 - 一、环境准备》 — 个人博客&url=http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/&via=http://example.com" data-title="Twitter">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
          <li>
            <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/" data-title="Google+">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        </ul>
     </div>
</div>
<div class="post-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;" id="wxShare-close">×</a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://example.com/2021/08/24/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E%E7%AC%94%E8%AE%B0-%E4%B8%80%E3%80%81%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87/" alt="微信分享二维码">
</div>

<div class="mask"></div>

        
        <ul class="article-footer-menu">
            
            
  <li class="article-footer-tags">
    <i class="fa fa-tags"></i>
      
    <a href="/tags/谷粒商城/" class="color5">谷粒商城</a>
      
  </li>

        </ul>
        
    </footer>
  </div>
</article>


    <aside class="post-toc-pos post-toc-top" id="post-toc">
        <nav class="post-toc-wrap">
            <ol class="post-toc"><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87"><span class="post-toc-text">环境准备</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E5%AE%89%E8%A3%85%E8%99%9A%E6%8B%9F%E6%9C%BA"><span class="post-toc-text">安装虚拟机</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E5%AE%89%E8%A3%85docker"><span class="post-toc-text">安装docker</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#docker%E5%AE%89%E8%A3%85mysql"><span class="post-toc-text">docker安装mysql</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#docker%E5%AE%89%E8%A3%85redis"><span class="post-toc-text">docker安装redis</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7%E9%85%8D%E7%BD%AE"><span class="post-toc-text">开发工具配置</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E9%85%8D%E7%BD%AEgit"><span class="post-toc-text">配置git</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#gitee-%E6%96%B0%E5%BB%BA%E4%BB%93%E5%BA%93%E5%B9%B6%E5%88%9D%E5%A7%8B%E5%8C%96%E9%A1%B9%E7%9B%AE"><span class="post-toc-text">gitee 新建仓库并初始化项目</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E6%95%B0%E6%8D%AE%E5%BA%93%E5%88%9D%E5%A7%8B%E5%8C%96"><span class="post-toc-text">数据库初始化</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E6%8B%89%E5%8F%96renren-fast%E9%A1%B9%E7%9B%AE"><span class="post-toc-text">拉取renren-fast项目</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E4%BD%BF%E7%94%A8renren-generator%E7%94%9F%E6%88%90%E4%BB%A3%E7%A0%81"><span class="post-toc-text">使用renren-generator生成代码</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E6%95%B4%E5%90%88-Mybatis-Plus-%E9%85%8D%E7%BD%AE"><span class="post-toc-text">整合 Mybatis-Plus 配置</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#%E7%94%9F%E6%88%90%E5%85%B6%E4%BB%96%E5%87%A0%E4%B8%AA%E6%A8%A1%E5%9D%97%E7%9A%84%E4%BB%A3%E7%A0%81"><span class="post-toc-text">生成其他几个模块的代码</span></a></li></ol></li></ol>
        </nav>
    </aside>
    

<nav id="article-nav">
  
  
    <a href="/2021/08/21/hello-world/" id="article-nav-older" class="article-nav-link-wrap">
      <span class="article-nav-title">Hello World</span>
      <i class="fa fa-hand-o-right" aria-hidden="true"></i>
    </a>
  
</nav>



    
</section>
        
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info" class="inner">
      
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


      <p>
        Powered by  <a href="http://hexo.io/" target="_blank">Hexo</a>
        Theme <a href="//github.com/wongminho/hexo-theme-miho" target="_blank">MiHo</a>
      &copy; 2021 Yao<br>
      </p>
    </div>
  </div>
</footer>
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>
  var mihoConfig = {
      root: "http://example.com",
      animate: true,
      isHome: false,
      share: true,
      reward: 0
  }
</script>
<div class="sidebar">
    <div id="sidebar-search" title="Search">
        <i class="fa fa-search"></i>
    </div>
    <div id="sidebar-category" title="Categories">
        <i class="fa fa-book"></i>
    </div>
    <div id="sidebar-tag" title="Tags">
        <i class="fa fa-tags"></i>
    </div>
    <div id="sidebar-top">
        <span class="sidebar-top-icon"><i class="fa fa-angle-up"></i></span>
    </div>
</div>
<div class="sidebar-menu-box" id="sidebar-menu-box">
    <div class="sidebar-menu-box-container">
        <div id="sidebar-menu-box-categories">
            
        </div>
        <div id="sidebar-menu-box-tags">
            <a href="/tags/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E/" style="font-size: 10px;">谷粒商城</a>
        </div>
    </div>
    <a href="javascript:;" class="sidebar-menu-box-close">&times;</a>
</div>
<div class="mobile-header-menu-nav" id="mobile-header-menu-nav">
    <div class="mobile-header-menu-container">
        <span class="title">Menus</span>
        <ul class="mobile-header-menu-navbar">
            
            <li>
                <a  href="/">
                    <i class="fa fa-home"></i><span>Home</span>
                </a>
            </li>
            
            <li>
                <a  href="/archives">
                    <i class="fa fa-archive"></i><span>Archives</span>
                </a>
            </li>
            
            <li>
                <a  href="/about">
                    <i class="fa fa-user"></i><span>About</span>
                </a>
            </li>
            
        </ul>
    </div>
    <div class="mobile-header-tag-container">
        <span class="title">Tags</span>
        <div id="mobile-header-container-tags">
            <a href="/tags/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E/" style="font-size: 10px;">谷粒商城</a>
        </div>
    </div>
</div>
<div class="search-wrap">
    <span class="search-close">&times;</span>
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
            <i class="icon icon-lg icon-chevron-left"></i>
        </a>
        <input class="search-field" placeholder="Search..." id="keywords">
        <a id="search-submit" href="javascript:;">
            <i class="fa fa-search"></i>
        </a>
    <div class="search-container" id="search-container">
        <ul class="search-result" id="search-result">
        </ul>
    </div>
</div>

<div id="search-tpl">
    <li class="search-result-item">
        <a href="{url}" class="search-item-li">
            <span class="search-item-li-title" title="{title}">{title}</span>
        </a>
    </li>
</div>

<script src="/js/search.js"></script>


<script src="/js/main.js"></script>



  <script src="//cdn.bootcss.com/particles.js/2.0.0/particles.min.js"></script>
  <div id="particles"></div>
  
<script src="/js/particles.js"></script>








  
<link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">

  <script src="//cdn.bootcss.com/scrollReveal.js/3.0.5/scrollreveal.js"></script>
  
<script src="/js/animate.js"></script>



  
<script src="/js/pop-img.js"></script>

  <script>
     $(".article-entry p img").popImg();
  </script>

  </div>
</body>
</html>